﻿package control
{
    import com.core.*;

    public class MainBottomControl extends Control
    {

        public function MainBottomControl(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "mainview")
            {
                if (param2.property == "updatehpmp")
                {
                    this.target.updateHPMp(param2.newvalue);
                    ModelProxy.change("role", "updatehpmp", param2.newvalue);
                }
                else if (param2.property == "updateAnger")
                {
                    this.target.updateAnger(param2.newvalue);
                }
                else if (param2.property == "updateRoleExp")
                {
                    this.target.updateExp();
                    ModelProxy.change("mainui", "powerlevel", null);
                }
                else if (param2.property == "setteamcount")
                {
                    this.target.menuControl.setTeaCount(param2.newvalue);
                }
                else if (param2.property == "setbagcount")
                {
                    this.target.menuControl.setBagCount(param2.newvalue);
                }
                else if (param2.property == "zuoqi")
                {
                    this.target.menuControl.showZuoqi(param2.newvalue);
                }
                else if (param2.property == "showHorse")
                {
                    this.target.menuControl.showZuoqiBtn(param2.newvalue);
                }
                else if (param2.property == "setPetState")
                {
                    this.target.menuControl.setPetState(param2.newvalue);
                }
                else if (param2.property == "showPetBtn")
                {
                    this.target.menuControl.showPetBtn(param2.newvalue);
                }
                else if (param2.property == "showemail")
                {
                    ModelProxy.change("mainui", "showemail", null);
                }
                else if (param2.property == "hidemail")
                {
                }
                else if (param2.property == "yitiancd")
                {
                }
                else if (param2.property == "bagItemChange")
                {
                    this.target.menuControl.btnNumChange();
                }
                else if (param2.property == "autoteamVisible")
                {
                    this.target.menuControl.autoteamVisible(param2.newvalue);
                }
                else if (param2.property == "updateGuanZhi")
                {
                    this.target.menuControl.showGuanWeiCount();
                }
                else if (param2.property == "updateskillcount")
                {
                    this.target.menuControl.showSkillCount(int(param2.newvalue[0]));
                }
                else if (param2.property == "shenlujiaobiao")
                {
                    this.target.menuControl.shenlujiaoniaoCT();
                }
                else if (param2.property == "updataRein")
                {
                    this.target.menuControl.showRein(param2.newvalue);
                }
                else if (param2.property == "showWingCount")
                {
                    this.target.menuControl.showWingCount();
                }
                else if (param2.property == "zudui")
                {
                    this.target.menuControl.showZudui(param2.newvalue);
                }
                else if (param2.property == "showNeiGongCount")
                {
                    this.target.menuControl.showNeiGongCount(param2.newvalue);
                }
                else if (param2.property == "showNeiGongAddCount")
                {
                    this.target.menuControl.showNeiGongAddCount(param2.newvalue);
                }
                else if (param2.property == "showBaoshiCount")
                {
                    this.target.menuControl.showBaoShiCount();
                }
            }
            else if (param1.getName() == "business")
            {
                if (param2.property == "request")
                {
                    ModelProxy.change("mainui", "showjiaoyi", null);
                }
            }
            return;
        }// end function

    }
}
